#!/usr/bin/env ruby
require 'rubygems'
require "daemons"
require 'yaml'
require 'erb'
require 'active_support'

options = YAML.load(
  ERB.new(
  IO.read(
  File.dirname(__FILE__) + "/../../config/daemons.yml"
  )).result).with_indifferent_access
options[:dir_mode] = options[:dir_mode].to_sym

Daemons.run File.dirname(__FILE__) + '/grabber.rb', options